// pages/ScenicArea/ScenicAreaPhotoAlbum/index.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    backUpPicList: [],
    backUpVideoList: []
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log(options)
    this.setData({
      backUpPicList: JSON.parse(decodeURIComponent(options.backUpPicList)),
      backUpVideoList: JSON.parse(decodeURIComponent(options.backUpVideoList))
    })
  },

  clickImage(e) {
    let {
      index
    } = e.currentTarget.dataset

    let urls = this.data.backUpPicList.map(i => {
      return i.pictureUrl
    })
    wx.previewImage({
      current: urls[index], // 当前显示图片的http链接
      urls // 需要预览的图片http链接列表
    })
  }
})